1, Field of the Invention
The invention relates to data transfer method and apparatus which are suitable for use in a tape streamer such that data of a large capacity is sequentially recorded and in which data whose block size is variable can be read and written at a high speed.
2. Description of the Related Art
In association with an increase in data capacity, as means for storing data of a large capacity, the necessity of a data recording apparatus such that data is recorded onto a magnetic tape is increasing. In a recording medium using such a magnetic tape, different from a recording medium by a disk, data is almost sequentially recorded. Such a recording apparatus is suitable for use in a backup of, for example, a hard disk of a large capacity.
For instance, such a recording apparatus is connected to a computer serving as a host through a predetermined interface. A command indicative of the execution of a data copy is issued from the host to the recording apparatus through the interface. After predetermined transmission and reception based on the connecting interface were performed, data is transferred from the host to the recording apparatus and the data is written to, for example, a magnetic tape by the recording apparatus.
Hitherto, the SCSI (Small Computer System Interface) has mainly been used as an interface to connect the host and the recording apparatus. In the SCSI, apparatuses which are connected to an SCSI bus are classified to an initiator (for example, SCSI board) to issue an SCSI command and a target (for instance, hard disk) to receive and execute the SCSI command. Data is transferred between the initiator and the target. In the above example, the SCSI board is connected to the computer and the recording apparatus is used as a target.
In the SCSI, data is handled on a block unit basis. The xe2x80x9cblockxe2x80x9d is a collection having a predetermined size of data and a file is constructed by collecting a plurality of blocks. The block of an arbitrary size is formed on the host side which forms a file. The data transfer by the SCSI is executed on a block unit basis in order to preserve block information.
Although a mode to collect a plurality of blocks into one block and transfer it is also prepared for the SCSI, in this mode, it is necessary that sizes of blocks to be collectively transferred are equal. In this case, a plurality of blocks can be transferred by one command. However, when the sizes of blocks to be transferred are different, there is a problem such that only one block can be transferred by the transfer of once, namely, by one command which is issued from the initiator.
To transfer once, besides the transfer time to transfer the data main body, the time for occupying (arbitration) the bus and the time for receiving and transmitting a command are necessary. Those periods of time become an overhead for the transfer time of the data main body.
When the block size is relatively large, the overhead time does not become a large problem. When the size of block to be transferred is small, however, the overhead time which is expended every block cannot be ignored and there is a problem such that a transfer speed decreases as a whole.
It is, therefore, an object of the invention to provide a data transfer method and apparatus which can collectively transfer blocks of different sizes.
To solve the foregoing problems, according to the invention, there are provided data transfer method and apparatus for transferring digital data whose block sizes are variable, characterized in that when a plurality of data blocks having different block sizes are transferred by one command to instruct the transfer, block information of a plurality of data blocks is transferred together with a plurality of data blocks.
As mentioned above, according to the invention, since the block information of a plurality of data blocks is transferred together with a plurality of data blocks, a plurality of data blocks whose block sizes are variable can be continuously transferred while preserving the block information.
The above, and other, objects, features and advantage of the present invention will become readily apparent from the following detailed description thereof which is to be read in connection with the accompanying drawings.